---
title   : Home
layout  : moment-base.hbs
order   : 0
scripts :
  - core-home
---

<header class="hero hero-moment">
	<div class="left-of-hero">
		<div>Moment.js <span>{{ size.moment_version }}</span></div>
		<div>Parse, validate, manipulate,</div>
		<div>and display dates and times in JavaScript.</div>
	</div>
	<div class="right-of-hero">
		<div>Considering using Moment in your project?</div>
		<div><em>There may be better modern alternatives.</em></div>
		<div>For more details and recommendations,</div>
		<div>please see <a href="/docs/#/-project-status/">Project Status</a> in the docs.</div>
	</div>
	<div class="centered">
		<div class="hero-circle">
			<div class="hero-face">
				<div id="hour" class="hero-hour"></div>
				<div id="minute" class="hero-minute"></div>
				<div id="second" class="hero-second"></div>
			</div>
		</div>
		<div class="hero-title">
			<h1>Black Lives Matter</h1>
			<h2><em>It is not our differences that divide us. It is our inability to recognize, accept, and celebrate those differences.</em> - Audre Lorde</h2>
			<h2>
				<span><a href="#donate">Donate</a></span>
				 |
				<span><a href="https://en.wikipedia.org/wiki/Black_Lives_Matter" target="_blank">Wikipedia</a></span>
				 |
				<span><a href="https://drive.google.com/drive/u/0/folders/1mljH99Nwy-SfgbDec-UDHSrrN1_JLmwB" target="_blank">Read</a></span>
				 |
				<span><a href="https://www.youtube.com/watch?v=YrHIQIO_bdQ" target="_blank">Watch</a></span>
				 |
				<span><a href="https://eji.org/get-involved/" target="_blank">Get Involved</a></span>
			</h2>
		</div>
	</div>
</header>


<div class="builds">
	<div class="builds-download">
		<h3>Download</h3>
		<a class="builds-button builds-button-source" href="/downloads/moment.js">
			moment.js
		</a>
		<a class="builds-button builds-button-gzipped" href="/downloads/moment.min.js">
			moment.min.js
			<span class="filesize">{{toKb size.moment_min.gzip }}</span>
		</a>
		<a class="builds-button builds-button-source" href="/downloads/moment-with-locales.js">
			moment-with-locales.js
		</a>
		<a class="builds-button builds-button-gzipped" href="/downloads/moment-with-locales.min.js">
			moment-with-locales.min.js
			<span class="filesize">{{toKb size.moment_with_locales_min.gzip }}</span>
		</a>
	</div>
	<div class="builds-packages">
		<h3>Install</h3>
		<pre><code>npm install moment --save   <span class="comment"># npm</span>
yarn add moment             <span class="comment"># Yarn</span>
Install-Package Moment.js   <span class="comment"># NuGet</span>
spm install moment --save   <span class="comment"># spm</span>
meteor add momentjs:moment  <span class="comment"># meteor</span>
bower install moment --save <span class="comment"># bower (deprecated)</span>
</code></pre>
	</div>
</div>

<div class="page-moment-index">

{{#markdown}}
### Format Dates

```js
moment().format('MMMM Do YYYY, h:mm:ss a');
moment().format('dddd');
moment().format("MMM Do YY");
moment().format('YYYY [escaped] YYYY');
moment().format();
```

### Relative Time

```js
moment("20111031", "YYYYMMDD").fromNow();
moment("20120620", "YYYYMMDD").fromNow();
moment().startOf('day').fromNow();
moment().endOf('day').fromNow();
moment().startOf('hour').fromNow();
```

### Calendar Time

```js
moment().subtract(10, 'days').calendar();
moment().subtract(6, 'days').calendar();
moment().subtract(3, 'days').calendar();
moment().subtract(1, 'days').calendar();
moment().calendar();
moment().add(1, 'days').calendar();
moment().add(3, 'days').calendar();
moment().add(10, 'days').calendar();
```

### Multiple Locale Support

```js
moment.locale();
moment().format('LT');
moment().format('LTS');
moment().format('L');
moment().format('l');
moment().format('LL');
moment().format('ll');
moment().format('LLL');
moment().format('lll');
moment().format('LLLL');
moment().format('llll');
```

{{/markdown}}

<div class="locales">
	{{#each locale }}
		<div class="button {{#is abbr "en" }}active{{/is}}" data-locale="{{ abbr }}">
			{{ name }}
		</div>
	{{/each}}
</div>

<div id="donate">

<h2>Donate</h2>

{{#markdown}}

Some Moment.js users may have a little extra money. Please support these charities:

### [Black Lives Matter Foundation](https://secure.actblue.com/donate/ms_blm_homepage_2019)
### [Equal Justice Initiative](https://support.eji.org/give/153413/#!/donation/checkout)
### [Innocence Project](https://www.innocenceproject.org/donate/)
### [The Leadership Conference](https://secure.actblue.com/donate/lcchr)
### [Minnesota Freedom Fund](https://minnesotafreedomfund.org/donate)
### [NAACP Legal Defense &amp; Education Fund](https://org2.salsalabs.com/o/6857/p/salsa/donation/common/public/?donate_page_KEY=15780)
### [Human Rights Watch](https://donate.hrw.org/page/15328/donate/1)

[Here is a list](https://blacklives.help/) of related organizations you can support.

{{/markdown}}

</div>

</div>
